// Copyright Epic Games, Inc. All Rights Reserved.

#pragma once

#include "Kismet/BlueprintFunctionLibrary.h"

#include "LyraVerbMessageHelpers.generated.h"

#define UE_API LYRAGAME_API

struct FGameplayCueParameters;
struct FLyraVerbMessage;

class APlayerController;
class APlayerState;
class UObject;
struct FFrame;

// 提供与FLyraVerbMessage相关的辅助函数的蓝图函数库
UCLASS(MinimalAPI)
class ULyraVerbMessageHelpers : public UBlueprintFunctionLibrary
{
	GENERATED_BODY()

public:
	/**
	 * 从对象获取玩家状态
	 * @param Object 输入对象
	 * @return 关联的玩家状态，如果无法获取则返回nullptr
	 */
	UFUNCTION(BlueprintCallable, Category = "Lyra")
	static UE_API APlayerState* GetPlayerStateFromObject(UObject* Object);

	/**
	 * 从对象获取玩家控制器
	 * @param Object 输入对象
	 * @return 关联的玩家控制器，如果无法获取则返回nullptr
	 */
	UFUNCTION(BlueprintCallable, Category = "Lyra")
	static UE_API APlayerController* GetPlayerControllerFromObject(UObject* Object);

	/**
	 * 将动词消息转换为游戏提示参数
	 * @param Message 输入的动词消息
	 * @return 转换后的游戏提示参数
	 */
	UFUNCTION(BlueprintCallable, Category = "Lyra")
	static UE_API FGameplayCueParameters VerbMessageToCueParameters(const FLyraVerbMessage& Message);

	/**
	 * 将游戏提示参数转换为动词消息
	 * @param Params 输入的游戏提示参数
	 * @return 转换后的动词消息
	 */
	UFUNCTION(BlueprintCallable, Category = "Lyra")
	static UE_API FLyraVerbMessage CueParametersToVerbMessage(const FGameplayCueParameters& Params);
};

#undef UE_API